<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>08.边框高亮</title>
  <style>
    body {
      background-color: #333;
      /* display: flex;
      justify-content: center;
      align-items: center; */
    }
    .css_example {
      padding: 5px;
      background-color: #fff;

    }
    /* 
      @property 自定义变量属性：以 -- 开头
      attribute: syntax： '<语法结构>'
      attribute: initial-value: '初始值'
      attribute: inherits '是否允许该属性被继承'
      参考链接：https://blog.csdn.net/qq_44879989/article/details/128759699
    */
    @property --direc {
      syntax: '<angle>'; 
      initial-value: 0deg;
      inherits: false;
    }
    .box {
      --direc: 0deg;
      position: relative;
      width: 200px;
      height: 300px;
      margin: 0 auto;
      background-image: linear-gradient(
        var(--direc),
        #ff6600 0%,
        #8744f1 100%
      ) ;
      
    }
    /* .box::after {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      content: '';
      background-image: linear-gradient(
        var(--rotate),
        #ff6600 0%,
        #8744f1 100%
      ) ;
      animation: cc 5s infinite;
    } */
    .inner {
      display: none;
      position: absolute;
      min-height: 2px;
      inset: 1rem;
      background-color: #fff;
    }

    @keyframes cc {
      to {  --direc: 360deg; }
    
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="inner">

    </div>
  </div>
  <p class="css_example">
    使用 inset 要求：<br>
    1. 当前元素需要相对定位：position: absolute; <br>
    2. 且要有内容填充或则最小高度
  </p>
</body>
</html>